<?php @session_start();?>
<?php 
include_once './util/ArrayList.php';
include_once './util/db/model/Product.php';
include_once './util/db/model/ProdType.php';
include_once './util/db/model/ProdAttr.php';
include_once './util/db/model/ProdSubType.php';
include_once './util/db/model/SupplierBrand.php';
include_once './util/db/model/ProductSearchPara.php';
include_once './util/db/service/ProductDBUtil.php';
include_once './util/db/service/ProdAttrDBUtil.php';
include_once './util/db/service/OrderListDBUtil.php';
include_once './util/db/service/ProdTypeDBUtil.php';
include_once './util/db/service/SupplierBrandDBUtil.php';
include_once './util/db/service/PreorderListDBUtil.php';

$orderListSearchPara = new OrderListSearchPara();
$orderListSearchPara->setType (0); //尋找商品是預購的
$orderListSearchPara->setStatus (0); //尋找訂單成立
$preorderListDBUtil = new PreorderListDBUtil ();
$preorderDetailArray = $preorderListDBUtil->queryPreorderDetail($orderListSearchPara);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/supplier.dwt" codeOutsideHTMLIsLocked="false" -->
<script src="../../admin/js/jquery.js"></script>
<script src="../../admin/js/jquery.tablePagination.0.2.min.js"></script>
<script>
$(document).ready(function () {
	$("#table1").tablePagination(); 
});
</script><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>預購商品出貨管理</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
#cantainer {
	width: 955px;
	margin-right: 33px;
	margin-left: 33px;
}
#header {
	width: 955px;
	margin-bottom: 10px;
	background-image: url(../../images/top_bg.png);
	height: 82px;
}
#body {
	width: 955px;
	margin-bottom: 10px;
}
#footer {
	width: 955px;
}
.style2 {color: #666666;
	font-size: 12px;
}
#contant_list {
	float: left;
	width: 180px;
	margin-right: 10px;
}
.style17 {color: #74B9E5; font-size: 14px; }
.style43 {font-size: 12px; color: #666666; font-weight: bold; }
#contant_body {
	float: right;
	width: 765px;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
#contant_body_header {
	background-image: url(../img/supplier_orderper_header.png);
	height: 62px;
	width: 765px;
	margin-bottom: 10px;
}
#contant_body_body {
	width: 765px;
	margin-bottom: 10px;
}
.style4 {font-size: 12px}
#contant_body_1_1 {width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_1_2 {width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_1_text {
	height: 25px;
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
	background-image: url(../img/supplier_order_text.png);
}
-->
</style>
<!-- InstanceEndEditable -->
</head>

<body>
<table width="1024" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div id="cantainer">
      <div id="header"></div>
      <div id="body">
       <div id="contant_list">
        <?php include_once './template/Category.php';?>
        </div>
        <!-- InstanceBeginEditable name="EditRegion1" -->
        <div id="contant_body">
          <div id="contant_body_header"></div>
          <div id="contant_body_body">
            <table cellpadding="0" cellspacing="0">
              <tr>
                <td colspan="3"><img src="../img/member_body_up.jpg" width="765" height="9" /></td>
              </tr>
              <tr>
                <td width="4" background="../img/member_body_left.jpg">&nbsp;</td>
                <td width="757"><div id="contant_body_1_text"></div>
                    <div id="contant_body_1_1">
                      <table id="table1" width="737" cellpadding="5" cellspacing="0">
                        <tr>
                          <td width="218" align="center" background="../../List_pages/images/products_contant_text_3.jpg" bgcolor="#F1F1F1" class="style4">商品貨號</td>
                          <td width="211" align="center" background="../../List_pages/images/products_contant_text_3.jpg" bgcolor="#F1F1F1" class="style4">商品名稱</td>
                          <td width="59" align="center" background="../../List_pages/images/products_contant_text_3.jpg" bgcolor="#F1F1F1" class="style4">商品尺寸</td>
                          <td width="59" align="center" background="../../List_pages/images/products_contant_text_3.jpg" bgcolor="#F1F1F1" class="style4">商品數量</td>
                          <td width="148" align="center" background="../../List_pages/images/products_contant_text_3.jpg" bgcolor="#F1F1F1" class="style4">&nbsp;</td>
                        </tr>
					<tr>
						<td colspan="5" align="center" class="style4">
                           <?php for($i = 0; $i < $preorderDetailArray->size (); $i ++) {
							$preorderDetail = $preorderDetailArray->get($i);
							?>
                          <table width="729" cellspacing="0"
							cellpadding="0">
							<tr>
								<td width="226" align="center"><?php echo $preorderDetail->getProduct()->getProd_no ();?></td>
								<td width="222" align="center"><?php echo $preorderDetail->getProduct()->getP_name ();?></td>
								<td width="63" align="center"><?php echo $preorderDetail->getProdAttr ()->getAttr ();?></td>
								<td width="63" align="center"><?php echo $preorderDetail->getProdAttr ()->getCount ();?></td>
								<td width="149" align="center"><a href="supplier_orderper_infor.php?pd_id=<?php echo $preorderDetail->getPd_id ()?>">進貨單資料</a></td>
							</tr>
						</table>
                           <?php }?>   
                          </td>
					</tr>
                       </table>
                    </div>
				</td>
                <td width="4" background="../img/member_body_right.jpg">&nbsp;</td>
              </tr>
              <tr>
                <td height="9" colspan="3"><img src="../img/member_body_down.jpg" width="765" height="9" /></td>
              </tr>
            </table>
          </div>
        </div>
        <!-- InstanceEndEditable --></div>
      <div id="footer">
         <?php include_once './template/footer.php';?>
      </div>
      </div></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
